package org.study.event.test.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.study.event.test.mapper.OrdersMapper;
import org.study.event.test.po.Orders;
import org.study.event.test.service.OrdersService;

@Service
public class OrderServiceImpl implements OrdersService {

	@Autowired
	private OrdersMapper ordersMapper;

	@Override
	public void saveOrders(Orders orders) {
		if (null != orders) {
			ordersMapper.saveOrder(orders);
		}
	}

	@Override
	public Orders findOrderByOrderId(Long orderId) {
		if (null != orderId && orderId > 0L) {
			return ordersMapper.findOrderByOrderId(orderId);
		}
		return null;
	}

}
